﻿using System;
using System.Collections;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;

namespace Jy123.Web.Module.Venues
{
    public class FillRaceFlash : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            string strObject = context.Cache["flash"].ToString();
            string strVId = context.Request.QueryString["VenuesId"];
            if (string.IsNullOrEmpty(strVId))
            {
                strVId = context.Request["VenuesId"];
            }
            string strXML = string.Format("/Module/VenuesRace/XML/{0}/{1}.xml", strVId, Guid.NewGuid());
            //string strXML = string.Format("/Module/Venues/GetRaceFlashXml.ashx?ModuleId={0}", strVId);
            strObject = strObject.Replace("$XML$", strXML);
            strObject = strObject.Replace("$Value$", "/Cache/Module/Flash/Court.swf");
            context.Response.Write(strObject);
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}
